MenuItem.Count Method

Returns as an Integer the number of menu items. For a menu item, it returns the number of submenu items, if any.

Syntax

If there are no submenu items, it returns zero.